using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataReviewerTools._DataValidation
{
    /// <summary>
    /// <para>Execute Reviewer Batch Job</para>
    /// <para>Runs a Reviewer batch job on a workspace and writes the results to a Reviewer session. A Reviewer batch job contains groups of Reviewer checks. Checks validate data based on conditions, rules, and spatial relationships. Checks also specify sets of features or rows to validate and their source workspace. A Reviewer session stores information about validation tasks performed by Reviewer checks. This information is stored in a table and a dataset in the Reviewer workspace.</para>
    /// <para>在工作空间上运行 Reviewer 批处理作业，并将结果写入 Reviewer 会话。Reviewer 批处理作业包含 Reviewer 检查组。检查根据条件、规则和空间关系验证数据。检查还指定要验证的要素或行集及其源工作空间。Reviewer 会话存储有关 Reviewer 检查执行的验证任务的信息。此信息存储在检查器工作空间的表和数据集中。</para>
    /// </summary>    
    [DisplayName("Execute Reviewer Batch Job")]
    public class ExecuteReviewerBatchJob : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ExecuteReviewerBatchJob()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_reviewer_workspace">
        /// <para>Reviewer Workspace</para>
        /// <para>The workspace where the Reviewer batch job results will be written.</para>
        /// <para>将写入 Reviewer 批处理作业结果的工作空间。</para>
        /// </param>
        /// <param name="_session">
        /// <para>Session</para>
        /// <para>The identifier and name for a Reviewer session. The session must exist in the Reviewer workspace.</para>
        /// <para>Reviewer 会话的标识符和名称。该会话必须存在于检查器工作空间中。</para>
        /// </param>
        /// <param name="_batch_job_file">
        /// <para>Batch Job File</para>
        /// <para>The path to the Reviewer batch job file to be executed.</para>
        /// <para>要执行的检查器批处理作业文件的路径。</para>
        /// </param>
        public ExecuteReviewerBatchJob(object _reviewer_workspace, object _session, object _batch_job_file)
        {
            this._reviewer_workspace = _reviewer_workspace;
            this._session = _session;
            this._batch_job_file = _batch_job_file;
        }
        public override string ToolboxName => "Data Reviewer Tools";

        public override string ToolName => "Execute Reviewer Batch Job";

        public override string CallName => "Reviewer.ExecuteReviewerBatchJob";

        public override List<string> AcceptEnvironments => ["extent", "workspace"];

        public override object[] ParameterInfo => [_reviewer_workspace, _session, _batch_job_file, _production_workspace, _analysis_area, _changed_features.GetGPValue(), _tableView, _production_workspaceversion];

        /// <summary>
        /// <para>Reviewer Workspace</para>
        /// <para>The workspace where the Reviewer batch job results will be written.</para>
        /// <para>将写入 Reviewer 批处理作业结果的工作空间。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Reviewer Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _reviewer_workspace { get; set; }


        /// <summary>
        /// <para>Session</para>
        /// <para>The identifier and name for a Reviewer session. The session must exist in the Reviewer workspace.</para>
        /// <para>Reviewer 会话的标识符和名称。该会话必须存在于检查器工作空间中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Session")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _session { get; set; }


        /// <summary>
        /// <para>Batch Job File</para>
        /// <para>The path to the Reviewer batch job file to be executed.</para>
        /// <para>要执行的检查器批处理作业文件的路径。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Batch Job File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _batch_job_file { get; set; }


        /// <summary>
        /// <para>Production Workspace</para>
        /// <para>The enterprise or file geodatabase that contains the features to be validated.</para>
        /// <para>包含要验证的要素的企业级地理数据库或文件地理数据库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Production Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _production_workspace { get; set; } = null;


        /// <summary>
        /// <para>Analysis Area</para>
        /// <para>Polygon features or extent values that define the area that will be used to build a validation processing area.</para>
        /// <para>用于定义将用于构建验证处理区域的区域的面要素或范围值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Analysis Area")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _analysis_area { get; set; } = null;


        /// <summary>
        /// <para>Changed Features Only</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of features, changed or unchanged, that will be validated when the production workspace references data in an enterprise geodatabase.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Only features that changed from the parent to the child version will be validated.</bullet_item><para/>
        ///     <bullet_item>Unchecked—All features in the data referenced by the batch job will be validated. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定在生产工作空间引用企业级地理数据库中的数据时将验证的要素类型（已更改或未更改）。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 仅验证从父版本更改为子版本的要素。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将验证批处理作业所引用的数据中的所有要素。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Changed Features Only")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _changed_features_value? _changed_features { get; set; } = null;

        public enum _changed_features_value
        {
            /// <summary>
            /// <para>CHANGED_FEATURES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CHANGED_FEATURES")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>ALL_FEATURES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ALL_FEATURES")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>BATCHRUNTABLE_View</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("BATCHRUNTABLE_View")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _tableView { get; set; }


        /// <summary>
        /// <para>Production Workspace Version</para>
        /// <para>The version of the production workspace to be validated by the batch job. This is only applicable when the production workspace is an enterprise geodatabase.</para>
        /// <para>要由批处理作业验证的生产工作区的版本。仅当生产工作空间是企业级地理数据库时，这才适用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Production Workspace Version")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _production_workspaceversion { get; set; } = null;


        public ExecuteReviewerBatchJob SetEnv(object extent = null, object workspace = null)
        {
            base.SetEnv(extent: extent, workspace: workspace);
            return this;
        }

    }

}